#include <QApplication>
//#include <QTableWidget>
//#include <QMessageBox>
#include <QPushButton>
#include <QHBoxLayout>
#include <QWidget>
//#include <QTableWidgetItem>

#include "MainWindow.h"
#include "MainWindow_v2.h"
#include "TabsAndToolboxWidget.h"
#include "DatabaseSearchDialog.h"
#include "DatabaseFillUpDialog.h"
#include "ItemNumberDialog.h"
#include "PrintDatabase.h"
//#include "ParamDialog.h"
//#include "StockItems.h"
//#include "StockModel.h"

#include <QtGui>
#include <QMessageBox>
#include <QTranslator>

#include "DataBaseWindow.h"
#include "StockModel.h"
#include "DataBase.h"
#include "ItemType.h"
#include "Debug.h"

#include "ItemEditDlg.h"

//main function

int main(int argc, char *argv[])
{

    QApplication* app;
    app = new QApplication( argc, argv );
    //app->setWindowIcon( QIcon("images/linux.pinguin.png") );
    app->setWindowIcon( QIcon("images/title1.jpg") );

    QTranslator qtTranslator;
    qtTranslator.load( "Lyra_ru", app->applicationDirPath() );
    app->installTranslator( &qtTranslator );

    /*QVector<QString> my;
    my.push_back("Article");
    my.push_back("Number");
    my.push_back("Description");
    ItemEditDlg dlg( my, 3, 0 );
    dlg.show();*/

    //MainWindow mainWin;
    //mainWin.show();

    //MainWindow_v2 mainWin;
    //mainWin.show();

    TabsAndToolboxWidget widget;
    widget.showMaximized();

    //DBMS *dbms = new DBMS();
    //dbms->ConnectDatabase( "Furniture" );

    //PrintDatabase PD(dbms->GetDatabase("Furniture"));
    //PD.showMaximized();
    //PD.Print();
    //return 0;

    //DBMS *dbms = new DBMS();
    //dbms->RemoveAllDatabases();
    //dbms->ConnectDatabase( "Profile" );
    //dbms->SetCurrentDatabase( "Profile" );
    //DatabaseSearchDialog* mainWin = new DatabaseSearchDialog(dbms->CurrentDatabase());
    //mainWin->show();

    //creating order database
    /*DataBaseInfo DBInfo;
    DBInfo.ColumnHeaders.push_back( QObject::tr("Article") );
    DBInfo.ColumnHeaders.push_back( QObject::tr("Description") );
    DBInfo.ColumnHeaders.push_back( QObject::tr("Number") );
    DBInfo.ColumnHeaders.push_back( QObject::tr("Format") );

    DBInfo.DBName = "Profile";
    DBInfo.ItemsNumber = 0;
    DBInfo.KeyField = 0;
    DBInfo.RecordsNumber = 4;
    DBInfo.VisibleNumber = 4;

    dbms->CreateDatabase( DBInfo );
    dbms->~DBMS();*/
    //Output( message, "DB has been created" );

    //DatabaseFillUpDialog *mainWin = new DatabaseFillUpDialog( dbms );
    //mainWin->show();

    //ItemNumberDialog *mainWin = new ItemNumberDialog( dbms->CurrentDatabase() );
    //mainWin->show();

    return app->exec();
}
